package com.ikingtech.framework.sdk.context.event;

import com.ikingtech.framework.sdk.enums.system.menu.MenuDefinition;
import lombok.Getter;
import org.springframework.context.ApplicationEvent;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * @author tie yan
 */
@Getter
public class ApplicationMenuInitEvent extends ApplicationEvent implements Serializable {

    @Serial
    private static final long serialVersionUID = 1136872379582325559L;

    private final String appCode;

    private final String tenantCode;

    private final List<MenuDefinition> menuDefinitions;

    public ApplicationMenuInitEvent(Object source, String tenantCode, String appCode, List<MenuDefinition> menuDefinitions) {
        super(source);
        this.tenantCode = tenantCode;
        this.appCode = appCode;
        this.menuDefinitions = menuDefinitions;
    }
}
